package com.zzzzzz.app.account.model.po;

import org.apache.commons.lang.builder.ToStringBuilder;

@Deprecated
public class Authority {

	/**
	 * SpringSecurity中默认的角色/授权名前缀.
	 */
	public static final String AUTHORITY_PREFIX = "ROLE_";

	private Integer id;
	private String name;

	public Authority() {
	}

	public Authority(Integer id, String name) {
		this.id = id;
		this.name = name;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static String getAuthorityPrefix() {
		return AUTHORITY_PREFIX;
	}

	public String getPrefixedName() {
		return AUTHORITY_PREFIX + name;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
